package schoolWork.work03.text1;

public class Person {
    private String name;
    private String sex;
    private int birthyear;


    public Person() {
    }

    public Person(String name, String sex, int birthyear) {
        this.name = name;
        this.sex = sex;
        this.birthyear = birthyear;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return sex
     */
    public String getSex() {
        return sex;
    }

    /**
     * 设置
     * @param sex
     */
    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     * 获取
     * @return birthyear
     */
    public int getBirthyear() {
        return birthyear;
    }

    /**
     * 设置
     * @param birthyear
     */
    public void setBirthyear(int birthyear) {
        this.birthyear = birthyear;
    }

    public String toString() {
        System.out.println("{name=" + name + ", sex=" +
                sex + ", birthyear=" + birthyear + "}");
        return null;
    }
}
